
****This file creates figures 1-5.  Each figure has a separate data file************

*****************************************************************
*************Figure 1********************************************
*****************************************************************

label var group "group"
label define group 1 "High SDO" 2 "High ITT" 3 "Unsophisticated" 4 "Independents" 5 "Evangelicals" 6 "General Public"
label value group group

*************thermometer of gays and lesbians all groups
twoway (scatter dm group) (rspike lb dm group) (rspike ub dm group), ytitle("Thermometer Rating") title("Attitudes Toward Gays and Lesbians") xlabel(1 "High SDO" 2 "High ITT" 3 "Unsophisticated" 4 "Independents" 5 "Evangelicals" 6 "General Public") xtitle("") xla(`levels', valuelabel angle(45)) legend(off) scheme(s1mono) name(fig2)

*************gay marriage opinion all groups
twoway (scatter ddm group) (rspike llb ddm group) (rspike uub ddm group), ytitle("Gay Marriage Opinion") title("Favorability Toward Gay Marriage") xlabel(1 "High SDO" 2 "High ITT" 3 "Unsophisticated" 4 "Independents" 5 "Evangelicals" 6 "General Public") xtitle("") xla(`levels', valuelabel angle(45)) legend(off) scheme(s1mono) name(fig3)

*************importance of gay marriage all groups
twoway (scatter dddm group) (rspike lllb dddm group) (rspike uuub dddm group), ytitle("Level of Importance") title("Importance of Gay Marriage Opinion") xlabel(1 "High SDO" 2 "High ITT" 3 "Unsophisticated" 4 "Independents" 5 "Evangelicals" 6 "General Public") xtitle("") xla(`levels', valuelabel angle(45)) legend(off) scheme(s1mono) name(fig4)

graph combine fig3 fig4 fig2, b1title(Error bars represent 95% confidence intervals) altshrink imargin(b=2 t=2) r(1) scheme(s1mono)

graph display, ysize(5) xsize(10)

*****************************************************************************************
******************Figure 2, difference in means gay marriage, by condition***************
*****************************************************************************************

label var cond "cond"
label define cond 1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda" 
label value cond cond

*****SDO by cond
twoway (scatter sdodm cond) (rspike sdolb sdodm cond) (rspike sdoub sdodm cond), yline(0,lp(dash)) title("High SDO") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) yscale(range(-1 1)) xtitle("") ylabel(#5) legend(off) scheme(s1mono) name(sdo)

*****ITT by cond
twoway (scatter ittdm cond) (rspike ittlb ittdm cond) (rspike ittub ittdm cond), yline(0,lp(dash)) title("High ITT") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) yscale(range(-1 1)) xtitle("") ylabel(#5) legend(off) scheme(s1mono) name(itt)

******evangl by cond

twoway (scatter evdm cond) (rspike evlb evdm cond) (rspike evub evdm cond), yline(0,lp(dash)) title("Evangelicals") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) yscale(range(-1 1)) xtitle("") ylabel(#5) legend(off) scheme(s1mono) name(evangel)

******general public by cond

twoway (scatter gpdm cond) (rspike gplb gpdm cond) (rspike gpub gpdm cond), yline(0,lp(dash)) title("General Public") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) yscale(range(-1 1)) xtitle("") ylabel(#5) legend(off) scheme(s1mono) name(gp)

******unsoph by cond

twoway (scatter undm cond) (rspike unlb undm cond) (rspike unub undm cond), yline(0,lp(dash)) title("Unsophisticated") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) yscale(range(-1 1)) xtitle("") ylabel(#5) legend(off) scheme(s1mono) name(un)

******mod by cond

twoway (scatter mdm cond) (rspike mlb mdm cond) (rspike mub mdm cond), yline(0,lp(dash)) title("Independents") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) yscale(range(-1 1)) xtitle("") ylabel(#5) legend(off) scheme(s1mono) name(mod)

graph combine sdo itt evangel un mod gp, l1title(Difference in Means) b1title(Error bars represent 95% confidence intervals) scheme(s1mono)


*****************************************************************************
********Figure 3, difference in means for importance by condition************
*****************************************************************************

label var cond "cond"
label define cond 1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda" 
label value cond cond

*****SDO by cond
twoway (scatter sdodm cond) (rspike sdolb sdodm cond) (rspike sdoub sdodm cond), yline(0,lp(dash)) title("High SDO") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) xtitle("") yscale(range(-1.5 1.5)) ylabel(#5) legend(off) scheme(s1mono) name(sdo)

*****ITT by cond
twoway (scatter ittdm cond) (rspike ittlb ittdm cond) (rspike ittub ittdm cond), yline(0,lp(dash)) title("High ITT") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) xtitle("") yscale(range(-1.5 1.5)) ylabel(#5) legend(off) scheme(s1mono) name(itt)

******evangl by cond
twoway (scatter evdm cond) (rspike evlb evdm cond) (rspike evub evdm cond), yline(0,lp(dash)) title("Evangelicals") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) xtitle("") yscale(range(-1.5 1.5)) ylabel(#5) legend(off) scheme(s1mono) name(evangel)

******general public by cond
twoway (scatter gpdm cond) (rspike gplb gpdm cond) (rspike gpub gpdm cond), yline(0,lp(dash)) title("General Public") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) xtitle("") yscale(range(-1.5 1.5)) ylabel(#5) legend(off) scheme(s1mono) name(gp)

******unsoph by cond
twoway (scatter undm cond) (rspike unlb undm cond) (rspike unub undm cond), yline(0,lp(dash)) title("Unsophisticated") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) xtitle("") yscale(range(-1.5 1.5)) ylabel(#5) legend(off) scheme(s1mono) name(un)

******mod by cond
twoway (scatter mdm cond) (rspike mlb mdm cond) (rspike mub mdm cond), yline(0,lp(dash)) title("Independents") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) yscale(range(-1.5 1.5)) xtitle("") ylabel(#5) legend(off) scheme(s1mono) name(mod)

graph combine sdo itt evangel un mod gp, l1title(Difference in Means) b1title(Error bars represent 95% confidence intervals) scheme(s1mono)

************************************************************************
*******Figure 4, diff means comparisons for gay therm by condition******
************************************************************************

label var cond "cond"
label define cond 1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda" 
label value cond cond

*****SDO by cond
twoway (scatter sdodm cond) (rspike sdolb sdodm cond) (rspike sdoub sdodm cond), yline(0,lp(dash)) title("High SDO") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) xtitle("") yscale(range(-20 20)) ylabel(#5) legend(off) scheme(s1mono) name(sdo)

*****ITT by cond
twoway (scatter ittdm cond) (rspike ittlb ittdm cond) (rspike ittub ittdm cond), yline(0,lp(dash)) title("High ITT") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) xtitle("") yscale(range(-20 20)) ylabel(#5) legend(off) scheme(s1mono) name(itt)

******evangl by cond
twoway (scatter evdm cond) (rspike evlb evdm cond) (rspike evub evdm cond), yline(0,lp(dash)) title("Evangelicals") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) xtitle("") yscale(range(-20 20)) ylabel(#5) legend(off) scheme(s1mono) name(evangel)

******general public by cond
twoway (scatter gpdm cond) (rspike gplb gpdm cond) (rspike gpub gpdm cond), yline(0,lp(dash)) title("General Public") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) xtitle("") yscale(range(-20 20)) ylabel(#5) legend(off) scheme(s1mono) name(gp)

******unsophisticated by cond
twoway (scatter undm cond) (rspike unlb undm cond) (rspike unub undm cond), yline(0,lp(dash)) title("Unsophisticated") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) xtitle("") yscale(range(-20 20)) ylabel(#5) legend(off) scheme(s1mono) name(un)

******moderate by cond
twoway (scatter mdm cond) (rspike mlb mdm cond) (rspike mub mdm cond), yline(0,lp(dash)) title("Independents") xlabel(1 "Legislature" 2 "Parade" 3 "Court" 4 "Referenda") xla(`levels', valuelabel angle(45)) yscale(range(-20 20)) xtitle("") ylabel(#5) legend(off) scheme(s1mono) name(mod)

graph combine sdo itt evangel un mod gp, l1title(Difference in Means) b1title(Error bars represent 95% confidence intervals) scheme(s1mono)

******************************************************************
**********Figure 5, before and after Supreme Court rulings********
******************************************************************

label var group "group"
label define group 1 "High SDO" 2 "Unsophisticated" 3 "Independents" 4 "Evangelicals" 5 "General Public"
label value group group

******first gay therm
twoway (scatter dm group) (rspike lb dm group) (rspike ub dm group), xtitle("") yline(0,lp(dash)) yscale(range(-15 15)) ylabel(#5) title("Attitudes Toward Gays and Lesbians") xlabel(1 "High SDO" 2 "Unsophisticated" 3 "Independents" 4 "Evangelicals" 5 "General Public") xla(`levels', valuelabel angle(45)) legend(off) scheme(s1mono) name(gaytherm)
*****second gay mar
twoway (scatter ddm group) (rspike llb ddm group) (rspike uub ddm group),  xtitle("") yline(0,lp(dash)) yscale(range(-1 1)) ylabel(#5) title("Gay Marriage Opinion") xlabel(1 "High SDO" 2 "Unsophisticated" 3 "Independents" 4 "Evangelicals" 5 "General Public") xla(`levels', valuelabel angle(45)) legend(off) scheme(s1mono) name(gaymar)
*****third importance "intensity"
twoway (scatter dddm group) (rspike lllb dddm group) (rspike uuub dddm group), xtitle("") yline(0,lp(dash)) yscale(range(-2 2)) ylabel(#5) title("Intensity of Gay Marriage") xlabel(1 "High SDO" 2 "Unsophisticated" 3 "Independents" 4 "Evangelicals" 5 "General Public") xla(`levels', valuelabel angle(45)) legend(off) scheme(s1mono) name(importance)

graph combine gaymar importance gaytherm, l1title(Difference in Means) b1title(Error bars represent 95% confidence intervals) altshrink imargin(b=1 t=1) scheme(s1mono) row(1)

graph display, ysize(4) xsize(7)
